---
title: "SQL-001: Submit an Appworx batch job"
summary: Calls the Appworx scheduler's Oracle queueing procedure to submit a batch job.
status: draft
owner: SAIF Documentation
last_reviewed: 2026-08-21
library: SAIF.Services.Appworx
reference_type: embedded
---

# SQL-001 Submit an Appworx batch job

Invokes the Oracle stored procedure `submit_appworx_job` through the BOF data portal to queue a batch job request for the Appworx scheduler. This is the only application-layer SQL statement in `SAIF.Services.Appworx` — there is no inline SQL and no `IBusinessCriteria` pattern in this library.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-001 |
| **Operation type** | Create (Insert, procedure-side) |
| **Execution method** | Stored procedure |
| **Database** | Oracle |
| **Schema** | `[unqualified]**` on the caller's default path; `WCIS_DBA` (procedure owner) on the retrieved procedure source |
| **Command type** | StoredProcedure |
| **Business object** | N/A (Application layer) |
| **Criteria property** | N/A |
| **Lifecycle method** | N/A |
| **Application class** | `clsRequestAppworxJob` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:inModule` | Input | VARCHAR2 (no default) | 30 | Appworx module/job name to run. Always sent. In-repo callers pass the literal `"LGN0002_LEGALNET_LETTERS"`. Inserted into `JOB_QUEUE.MODULE`. |
| `:inRequestor` | Input | VARCHAR2 (no default) | 32 | Requesting system/user label. Always sent. Instance field default `"APPWORX"`; shared-overload default `"Appworx"`. In-repo callers pass `"LegalNet"`. Inserted into `JOB_QUEUE.REQUESTOR`. |
| `:inPrinter` | Input | VARCHAR2 (no default) | 30 | Target printer/output destination. Always sent. Default `"SYSOUT"`; in-repo callers pass `MDefaultPrinter`. Accepted by the procedure but never persisted (see PR-004 in [Procedures](../procedures/submit-appworx-job.md#business-rules)). |
| `:inArg1` | Input | VARCHAR2 DEFAULT '' | 4000 | Job argument slot 1. Sent only when non-empty. → `JOB_QUEUE.ARG_1`. In-repo usage: comma-joined letter-request sequence numbers / request number. |
| `:inArg2` | Input | VARCHAR2 DEFAULT '' | 4000 | Job argument slot 2. Conditional. → `JOB_QUEUE.ARG_2`. In-repo usage: `MDefaultPrinter` (printer passed again as data). |
| `:inArg3` | Input | VARCHAR2 DEFAULT '' | 4000 | Job argument slot 3. Conditional. → `JOB_QUEUE.ARG_3`. Deliberately skipped by all three in-repo callers, producing a positional gap. |
| `:inArg4` | Input | VARCHAR2 DEFAULT '' | 4000 | Job argument slot 4. Conditional. → `JOB_QUEUE.ARG_4`. In-repo usage: `DPI.UserID` (submitting user identity, for attribution). |
| `:inArg5` | Input | VARCHAR2 DEFAULT '' | 4000 | Job argument slot 5. Conditional. → `JOB_QUEUE.ARG_5`. In-repo usage: action discriminator (`"UpdateCreateFile"`, `"UpdateMailedDate"`, `"NewReconRequest"`). |
| `:inArg6` | Input | VARCHAR2 DEFAULT '' | 4000 | Job argument slot 6. Conditional. → `JOB_QUEUE.ARG_6`. In-repo usage: case sequence numbers / current legal case ID. |
| `:inArg7`–`:inArg20` | Input | VARCHAR2 DEFAULT '' | 4000 | Job argument slots 7–20. Conditional. → `JOB_QUEUE.ARG_7`–`ARG_20`. Not used by any in-repo caller. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [JOB_QUEUE](../database-tables.md#job_queue) | INSERT | `MODULE`, `REQUESTOR`, `MASTER_JOB_NUMBER`, `JOBID`, `ARG_1` … `ARG_20` |
| [DUAL](../database-tables.md#dual) | SELECT | *(none — `SO_MAX_JOBID.NEXTVAL` pseudo-column only)* |

## Sample SQL

```sql
-- Call signature as constructed in clsRequestAppworxJob.vb, SubmitBatchJob (instance method).
-- The inArgN parameters are bound only when the corresponding slot is non-empty, so the
-- effective call ranges from 3 to 23 bound parameters.
BEGIN
  submit_appworx_job(
    inModule    => :inModule,
    inRequestor => :inRequestor,
    inPrinter   => :inPrinter,
    inArg1      => :inArg1,
    inArg2      => :inArg2,
    inArg3      => :inArg3,
    inArg4      => :inArg4,
    inArg5      => :inArg5,
    inArg6      => :inArg6,
    inArg7      => :inArg7,
    inArg8      => :inArg8,
    inArg9      => :inArg9,
    inArg10     => :inArg10,
    inArg11     => :inArg11,
    inArg12     => :inArg12,
    inArg13     => :inArg13,
    inArg14     => :inArg14,
    inArg15     => :inArg15,
    inArg16     => :inArg16,
    inArg17     => :inArg17,
    inArg18     => :inArg18,
    inArg19     => :inArg19,
    inArg20     => :inArg20);
END;
```

The procedure body resides in the database (Oracle schema `WCIS_DBA`) — the retrieved body is reproduced under [Procedures](../procedures/submit-appworx-job.md).

## Operations and processes
- [Execute the Appworx submission stored procedure](../operations/submit-batch-job-instance.md)
- [Submit an Appworx batch job (shared overload)](../operations/submit-batch-job-shared.md)

## Business rules
- [BR-003: Only populated argument slots are transmitted](../business-rules.md#br-003-only-populated-argument-slots-are-transmitted)
- [BR-004: Module, requestor, and printer are always supplied with defaults](../business-rules.md#br-004-module%2C-requestor%2C-and-printer-are-always-supplied-with-defaults)
- [BR-005: Submission values are length-bounded to the scheduler's contract](../business-rules.md#br-005-submission-values-are-length-bounded-to-the-schedulers-contract)

## Sources
- `SAIF.Services.Appworx/clsRequestAppworxJob.vb`
